#ifndef LEVELREADER_H_
#define LEVELREADER_H_

#include "BasicFileReader.h"
#include "Object.h"
#include "Border.h"
#include "ObjectList.h"
#include "MaterialList.h"
#include "TextureManager.h"
#include "NavigationEdge.h"

class LevelReader : public BasicFileReader
{
	static int GetElementType(char * element);
	static int GetObjectType(char * element);
	static int GetCharacterType(char * element);
	public:
	
	static void LoadLevel(TextureManager * textureManager, ObjectList ** objectList, MaterialList ** materialList, char * filename);
	static void HandleBorderTag(ObjectList ** objectList, char * tag, int pos);
	static void HandleObjectTag(TextureManager * textureManager, ObjectList ** objectList, MaterialList ** materialList, char * tag, int pos);
	static void HandleBaseObjectTag(TextureManager * textureManager, ObjectList ** objectList, MaterialList ** materialList, char * tag, int pos);
	static void HandleRotatingObjectTag(TextureManager * textureManager, ObjectList ** objectList, MaterialList ** materialList, char * tag, int pos);
	static void HandleMaterialTag(MaterialList ** materialList, char * tag, int pos);
	static void HandleTranslatingObjectTag(TextureManager * textureManager, ObjectList ** objectList, MaterialList ** materialList, char * tag, int pos);
	static void HandleConditionalTranslatingObjectTag(TextureManager * textureManager, ObjectList ** objectList, MaterialList ** materialList, char * tag, int pos);
	static void HandlePressureObjectTag(TextureManager * textureManager, ObjectList ** objectList, MaterialList ** materialList, char * tag, int pos);
	static void HandleCharacterObjectTag(TextureManager * textureManager, ObjectList ** objectList, char * tag, int pos);
	static void HandleBasicCharacterTag(TextureManager * textureManager, ObjectList ** objectList, char * tag, int pos);
	static NavigationEdge * ReadNextNavigationEdge(TextureManager * textureManager, ObjectList ** objectList, char * tag, int * pos);
};
#endif /*LEVELREADER_H_*/
